
<script>
    $(document).ready(function(){
        $("#editcollegeprofile").validationEngine();

        
    });
</script>

<%@page import="java.sql.*"%>
<%@page import="jobportal.Dbconn"%>
<%
    try {

        Connection con = Dbconn.getConn();
        Statement st = con.createStatement();
        String clgid="";
        String dest="EditProfile1";
        if(session.getAttribute("role")!=null&&session.getAttribute("role").toString().equalsIgnoreCase("admin")){
                clgid=request.getParameter("clgid");
                dest="../College/"+dest;
        }else{
                clgid=(String)session.getAttribute("username");
        }
        ResultSet rs = st.executeQuery("select * from college where clgid= '" + clgid + "'");
        rs.next();
%>

<div class="mainheading_emp" style="clear:both; margin-bottom:5px;">Manage College Profile</div>
<br class="clear" />
<table border="0" cellspacing="0" cellpadding="0" style=" height:auto;">
    <tbody>
        <tr>
            <td width="651" align="left" valign="top" style="padding-left:25px;">
                <form name="editcollegeprofile" id="editcollegeprofile" action="<%=dest%>" method="get"  >
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tbody><tr>
                                <td height="30" valign="bottom" style="padding-top:10px;"><div align="left" class="mainheading" style="padding-bottom:10px;"></div>
                                    <div class="heading_line_hor"><!-- --></div>
                                </td>
                            </tr>
                            <tr>
                                <td align="left"><div align="left" style="padding-top:10px;"></div></td>
                            </tr>
                            <tr>
                                <td align="center" class="messagesred">
                                </td>
                            </tr>
                            <tr>
                                <td align="center">		<div align="right" style="padding-right:20px;"><span class="messagesred">*</span>Fields are mandatory</div></td>
                            </tr>
                        </tbody></table>
                    <img src="./company Registration_files/blank.gif" width="1" height="15">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-left:20px;">
                        <tbody><tr>
                                <td colspan="4">
                                    <input type="hidden" name="clgid" id="clgid" value="<%=clgid%>">
                                    
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4"></td>
                            </tr>
                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> TPO Name </p></td>
                                <td width="711" colspan="4" align="left" valign="middle"><input id="tponame" size="25" class="validate[required],custom[onlyLetterSp]" name="tponame" value="<%=rs.getString("tponame")%>"  ></td>
                            </tr>
                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p>*Email</p></td>
                                <td colspan="4" align="left" valign="middle"><input id="tpoemail" size="25" name="tpoemail" class="validate[required],custom[email]" value="<%=rs.getString("tpoemail")%>" ></td>
                            </tr>

                            <tr>
                                <td height="28" colspan="3" style="padding-left:5px;"><strong>College Information:</strong> <div class="line_spacer1"><!-- --></div></td>
                            </tr>
                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> College Name</p></td>
                                <td colspan="4" align="left" valign="middle"><input id="clgname" size="25" name="clgname" class="validate[required]" value="<%=rs.getString("clgname")%>"></td>
                            </tr>
                            <tr>
                                <td valign="top" colspan="2" style="padding-left:5px;"><p><span class="messagesred">*</span> College Address</p></td>
                                <td colspan="4" align="left" valign="middle"> <textarea name="address" cols="40" rows="4" id="address" class="validate[required]"><%=rs.getString("address")%>	</textarea></td>
                            </tr>

                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><span class="messagesred">*</span> State</td>
                                <td align="left" valign="middle"><div id="txtHint1">
                                        <select name="state" id="state" style="width: 200px;" class="validate[required],listmenu" >
                                            <option value="">Select State</option>
                                            <option value="<%=rs.getString("state")%>" selected="selected"><%=rs.getString("state")%></option>
                                            <option value="Kerala">Kerala</option>
                                            <option value="Jharkhand">Jharkhand</option>
                                            <option value="Bihar">Bihar</option>
                                            <option value="WestBengal">West Bengal</option>
                                        </select>
                                    </div>                                    </td>
                            </tr>
                            <tr>
                                <td height="60" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> City </p></td>
                                <td align="left" valign="middle"><div id="txtHint1">
                                        <select name="city" id="city" style="width: 200px;" class="validate[required],listmenu" >
                                            <option value="">Select City</option>
                                            <option value="<%=rs.getString("city")%>" selected="selected"><%=rs.getString("city")%></option>
                                            <option value="Trivandrum">Trivandrum</option>
                                            <option value="Ranchi">Ranchi</option>
                                            <option value="Patna">Patna</option>
                                            <option value="Kolkata">Kolkata</option>
                                        </select>
                                    </div>                                    </td>
                            </tr>

                            <tr>
                                <td width="246" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> College Profile </p></td>
                                <td colspan="4" align="left" valign="middle">
                                    <textarea name="clgprofile"  id="wysiwyg" class="validate[required]"><%=rs.getString("clgprofile")%>	</textarea></td>
                            </tr>
                            <tr>
                                <td valign="top">&nbsp;</td>
                                <td colspan="4" align="left" valign="middle">&nbsp;</td>
                            </tr>
                            <tr>
                                <td height="28" colspan="4" valign="top" style="padding-left:5px;"><strong>Contact Numbers</strong>
                                    <div class="line_spacer1"><!-- --></div></td>
                            </tr>
                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><span class="messagesred">*</span> Office</td>
                                <td colspan="4" align="left" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <tbody><tr>
                                                <td><input id="contact" size="25" class="validate[required],custom[phone]" name="contact" value="<%=rs.getString("contact")%>"></td>
                                            </tr>
                                        </tbody></table></td>
                            </tr>
                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:15px;"><p>Fax </p></td>
                                <td colspan="4" align="left" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <tbody><tr>
                                                <td><input id="fax" size="25" name="fax" class="validate[required],custom[phone]"value="<%=rs.getString("fax")%>"></td>
                                            </tr>
                                        </tbody></table></td>
                            </tr>
                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> Mobile </p></td>
                                <td colspan="4" align="left" valign="middle"><input id="mobile" size="25" name="mobile" class="validate[required],custom[phone]" value="<%=rs.getString("mobile")%>" >
                                    &nbsp; <span id="check_mobile_div"></span></td>
                            </tr>
                            <tr>
                                <td colspan="4" valign="top">&nbsp;</td>
                            </tr>

                            <tr>
                                <td height="34" valign="top" style="padding-left:5px;">University Name</td>
                                <td colspan="4" align="left" valign="middle"><label>
                                        <input type="text" name="uname" id="uname" class="validate[required],custom[onlyLetterSp]" size="25" value="<%=rs.getString("uname")%>" />
                                    </label></td>
                            </tr>
                            <tr>
                                <td height="34" valign="top" style="padding-left:5px;"><p>Website URL </p></td>
                                <td colspan="4" align="left" valign="middle"><input name="url" id="url" size="40" maxlength="100" class="validate[required],custom[url]" value="<%=rs.getString("url")%>">                              </td>
                            </tr>


                            <tr>
                                <td colspan="4" align="center" valign="middle" height="2"></td>
                            </tr>
                            <tr>
                                <td colspan="4" align="center" valign="middle" height="10px">&nbsp;</td>
                            </tr>
                        </tbody></table>
                    <div style="padding-left:220px; padding-top:10px; padding-bottom:10px;"><input name="Submit" type="submit" value="Update" class="button2"></div>
                </form>
            </td>
            <td align="left" valign="top" width="259">
                <div style="clear:both;">&nbsp;</div>
            </td>

                <%
                    } catch (Exception e) {
                        out.println("Exception ::" + e);
                    }
                %>
        </tr>
    </tbody>
</table>